const { query } = require('../config/database')

async function checkTableStructure () {
  try {
    console.log('检查用户表结构:')
    const structure = await query('DESCRIBE users')
    console.table(structure)

    console.log('\n检查用户数据:')
    const users = await query('SELECT * FROM users')
    console.table(users)
  } catch (error) {
    console.error('查询失败:', error)
  }
  process.exit(0)
}

checkTableStructure()
